<script setup>
import { ref } from 'vue'
import {sayHello} from '../api/hello'
const count =ref(0)
const message = ref("依力音乐盒后台")
const hi=()=>{
  sayHello().then((res)=>{
    console.log(res)
    message.value=res.data
  })
}
</script>

<template>
  <div>
    <h1>{{message}}</h1>
    <div class="button-container">
      <q-btn color="primary" @click="count++">点击次数{{count}}</q-btn>
      
    </div>
    <div class="button-container">
 
      <q-btn color="primary" @click="hi" >发送请求</q-btn>
    </div>
    
  </div>
</template>

<style scoped>
a {
  color: #42b983;
}
.button-container{
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom:10px;
}
</style>
